
IF EXISTS (SELECT name 
	   FROM   sysobjects 
	   WHERE  name = N'UserProfile' 
	   AND 	  type = 'U')
    DROP TABLE UserProfile
GO

create table UserProfile (
	ProfileID int primary key identity(1,1) NOT NULL,
	UserID uniqueidentifier foreign key references aspnet_Users(UserId) NOT NULL, 
	ProfilePicID int foreign key references UserPicture(PictureId) NULL,
	FirstName nvarchar(255) NOT NULL,
	LastName nvarchar(255) NOT NULL,
	BirthDate datetime NOT NULL,
	Sex char(1) NOT NULL,
	Hometown nvarchar(1000) NULL,
	AboutMe nvarchar(max) NULL,
	MemberSince datetime NOT NULL,
	IsPublic bit NOT NULL,
	ts timestamp NULL)
GO

